<?php

class Admin_Form_Kind extends Sfs_Form
{
	public function init()
	{
		$this->addElement('text','title',array(
			'label' => 'title',
			'required'   => true,
			'filters'    => array('StringTrim','StripTags'),
			'validators' => array('NotEmpty'),
		));
		$module = new Default_Model_Module();
		$translate = Zend_Registry::get('Zend_Translate');
		$moduleMenu = $module->getModuleMenu('',$translate->translate('topPage'));
		// 分類選單

		$arr = array(''=>'topPage');
		foreach($moduleMenu as $row)
			$arr[$row['resource_id']] = $row['title'];

		$this->addElement('select','parent_id',array(
			'label' => 'parent_id',
			'multiOptions'=>$arr
		));

		$this->addElement('checkbox','published',array(
			'label' => 'published',
			'required'	=>true,
			'multiOptions'=>array(1=>'published')
		));
		$this->addElement('submit','addgroup');
	}
}